import type { App } from 'vue';
import ElementPlus from 'element-plus';
import * as ElIcons from '@element-plus/icons-vue';

export const setupElementPlus = (app: App<Element>) => {
	app.use(ElementPlus);

	//全局注册图标
	for (const [key, component] of Object.entries(ElIcons)) {
		app.component(`el-icon-${key.toLowerCase()}`, component);
		app.component(component.name, component);
	}
};
